<!DOCTYPE html>
<html>
<?php require 'header.php'; ?>
<body>

<?php require 'title.php'; ?>

<div class="layui-content" style="padding-top: 0px;">
    <div class="layui-container">
        <div class="layui-row">

            <?php require 'step.php'; ?>

            <div class="layui-col-md12">
                <div class="layui-card layui-fixed">
                    <div class="layui-card-header">
                        <span>2 目录权限检测</span>
                        <span class="layui-card-version"><?= $versionInfo['code'] ?></span>
                    </div>
                    <div class="layui-card-body">
                        <table class="layui-table dir" lay-skin="nob">
                            <thead>
                            <tr>
                                <th>目录名</th>
                                <th>写入权限</th>
                                <th>读取权限</th>
                            </tr>
                            </thead>
                            <tbody>
                            <?php foreach ($folderLimits as $ko => $vo) { ?>
                                <tr>
                                    <td><?= $ko ?></td>
                                    <td><?= $vo[0] ?></td>
                                    <td><?= $vo[1] ?></td>
                                </tr>
                            <?php } ?>
                            </tbody>
                        </table>
                    </div>
                    <div class="layui-center" style="margin: 60px auto;">
                        <button type="button" onclick="window.history.go(-1);"
                                class="layui-btn layui-btn-normal layui-btn-radius"
                                style="border-radius:5px !important;">上一步
                        </button>
                        <button id="step" type="button" class="layui-btn layui-btn-normal layui-btn-radius"
                                style="border-radius:5px !important;">下一步
                        </button>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
</div>

<?php require 'footer.php'; ?>

</body>


<script type="text/javascript">
    layui.use(['jquery', 'layer'], function () {
        var layer = layui.layer;
        var jquery = layui.jquery;

        jquery('#stepOne').addClass('layui-active');
        jquery('#stepTwo').addClass('layui-active');

        var passTwo = <?= $passTwo ?>;

        jquery('#step').click(function () {
            if (passTwo) {
                window.location.href = "./index.php?step=3";
            } else {
                layer.msg('目录权限异常');
            }
        })

    })
</script>
</html>